// src/api/teacher.js
import apiClient from './index'

export const teacherApi = {
    // 个人信息
    registerTeacher(teacherData) {
        return apiClient.post('/teacher/register', teacherData)
    },

    getTeacherProfile() {
        return apiClient.get('/teacher/profile')
    },

    updateTeacherProfile(teacherData) {
        return apiClient.put('/teacher/profile', teacherData)
    },

    // 获取指导的学生实习列表
    getGuidedInternships(params) {
        return apiClient.get('/internships/teacher', { params })
    },

    // 获取待审核材料
    getPendingMaterials() {
        return apiClient.get('/teacher/materials/pending')
    },

    // 获取特定学生的实习材料
    getStudentMaterials(studentId) {
        return apiClient.get(`/teacher/students/${studentId}/materials`)
    },

    // 审核材料
    reviewMaterial(reviewData) {
        return apiClient.put('/teacher/materials/review', reviewData)
    },

    // 学生管理
    getGuidedStudents() {
        return apiClient.get('/teacher/students')
    },

    getStudentDetail(studentId) {
        return apiClient.get(`/teacher/students/${studentId}`)
    },
    // 获取所有评定实习成绩列表
    getPendingEvaluations(params) {
        return apiClient.get('/teacher/internships/all-evaluations', { params })
    },

    // 获取学生的历史评定记录
    getStudentEvaluations(studentId) {
        return apiClient.get(`/teacher/students/${studentId}/evaluations`)
    },

    // 提交学生实习成绩评定
    evaluateInternship(evaluationData) {
        return apiClient.post('/teacher/evaluations', evaluationData)
    },
    // 成绩评定
    evaluateStudent(evaluationData) {
        return apiClient.post('/teacher/evaluations', evaluationData)
    }
}
